import java.util.Scanner;

public class Practice2 {
    public static void main(String[] args) {
        //https://ac.nowcoder.com/acm/problem/223985
        //模拟, 要记住需要注意10L, 因为相乘会转换成int会导致结果出错
        Scanner sc = new Scanner(System.in);
        int a = sc.nextInt();
        int h = sc.nextInt();
        int b = sc.nextInt();
        int k = sc.nextInt();
        long count = 0;
        while(h > 0 && k > 0){
            count += a;
            count += b;
            h -= b;
            k -= a;
        }
        if(h <= 0 && k <= 0){
            System.out.println(count);
        }else if(h <= 0){
            count += b *10L;
            System.out.println(count);
        }else{
            count += a *10L;
            System.out.println(count);
        }
    }
}
